#include <iostream>
#include "algorithm.h" // 包含 MatrixGraph 的定义

int main() {
    MatrixGraph graph(5); // 创建一个有 5 个顶点的图

    // 添加城市
    graph.addCity("A");
    graph.addCity("B");
    graph.addCity("C");
    graph.addCity("D");
    graph.addCity("E");

    // 添加边
    graph.addEdge("A", "B", 1,10);
    graph.addEdge("A", "C", 1,5);
    graph.addEdge("B", "C", 1,2);
    graph.addEdge("B", "D", 1,1);
    graph.addEdge("C", "B", 1,3);
    graph.addEdge("C", "D", 1,9);
    graph.addEdge("C", "E", 1,2);
    graph.addEdge("D", "E", 1,4);
    graph.addEdge("E", "D", 1,6);

    // 测试 Dijkstra 算法
    std::cout << "从 A 到 D 的最短路径: ";
    graph.Dijkstra(0, "A", "D"); // 选择合适的 choose 值

    return 0;
}
